<template>
  <div class="all">
    <div
      v-loading="loading"
      element-loading-text="拼命加载中"
      element-loading-spinner="el-icon-loading"
      style="width: 100%">
    </div>
    <div class="shopBox">
      <allitem v-for="(x,y) in shopList" :data="x" :key="y"></allitem>
    </div>
  </div>
</template>

<script>
  import allitem from "./allitem";
  export default {
    name: "all",
    components:{
      allitem
    },
    props:{
      id:{
        type:Number,
        required:true
      },
    },
    data() {
      return {
        loading: false,
        page:1,
        shopList:[]
      }
    },
    mounted() {
      this.$myAxios('addons/shopro/goods/grouponList', 'get', {
        page:this.page //全部的商品
      },0).then(res => {
        console.log(res);
        if(res.data.code == 1){
          this.shopList = res.data.data.data
        }else{
          this.$myNotice(res.data.msg,2000);
        }
      })
    }
  }
</script>

<style scoped>
  .all {
    width: 100%;
    min-height: 5.87rem;
    box-sizing: border-box;
    background-color: #F5F5F5;
    position: relative;
    padding: .1rem;
  }

</style>
